<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>修改友情链接</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
	</head>
	<body>
		<div class="container-fluid">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
				<li class="breadcrumb-item"><a href="friendlink_main.php">友情链接管理</a></li>
				<li class="breadcrumb-item active">修改友情链接</li>
			</ol>
			<div class="card shadow-sm">
				<div class="card-header">修改友情链接</div>
				<div class="card-body">
					<form action="friendlink_edit.php" method="post" enctype="multipart/form-data" name="form1">
						<input type="hidden" name="id" value="<?php echo $myLink['id']?>">
						<input type="hidden" name="dopost" value="saveedit">
						<div class="table-responsive">
							<table class="table table-borderless">
								<tbody>
									<tr>
										<td width="260">网址</td>
										<td><input type="text" name="url" id="url" value="<?php echo $myLink['url']?>" class="admin-input-lg" required></td>
									</tr>
									<tr>
										<td>网站名称</td>
										<td><input type="text" name="webname" id="webname" value="<?php echo $myLink['webname']?>" class="admin-input-lg" required></td>
									</tr>
									<tr>
										<td width="260">排列位置</td>
										<td><input type="text" name="sortrank" id="sortrank" value="<?php echo $myLink['sortrank']?>" class="admin-input-sm">（由小到大排列）</td>
									</tr>
									<tr>
										<td>网站Logo</td>
										<td><input type="text" name="logo" id="logo" value="<?php echo $myLink['logo']?>" class="admin-input-lg">（88*31 gif或jpg）</td>
									</tr>
									<tr>
										<td>上传Logo</td>
										<td><input type="file" name="logoimg" id="logoimg" class="admin-input-lg"></td>
									</tr>
									<tr>
										<td>网站简况</td>
										<td><textarea name="msg" id="msg" class="admin-textarea-sm"><?php echo dede_htmlspecialchars($myLink['msg'])?></textarea></td>
									</tr>
									<tr>
										<td>邮箱</td>
										<td><input type="text" name="email" id="email" autocomplete="off" value="<?php echo $myLink['email']?>" class="admin-input-lg"></td>
									</tr>
									<tr>
										<td>链接位置</td>
										<td>
											<label><input type="radio" name="ischeck" value="0" <?php if ($myLink['ischeck']==0) echo 'checked'?>> 待审核</label>
											<label><input type="radio" name="ischeck" value="1" <?php if ($myLink['ischeck']==1) echo 'checked'?>> 内页</label>
											<label><input type="radio" name="ischeck" value="2" <?php if ($myLink['ischeck']==2) echo 'checked'?>> 首页</label>
										</td>
									</tr>
									<tr>
										<td>网站类型</td>
										<td>
											<select name="typeid" id="typeid" class="admin-input-sm">
												<?php
												echo " <option value='".$myLink['typeid']."'>".$myLink['typename']."</option>";
												$dsql->SetQuery("SELECT * FROM `#@__flinktype` where id<>'".$myLink['typeid']."'");
												$dsql->Execute();
												while($row=$dsql->GetObject()){
													echo " <option value='".$row->id."'>".$row->typename."</option>";
												}
												?>
											</select>
										</td>
									</tr>
									<tr>
										<td colspan="2" align="center">
											<button type="submit" class="btn btn-success btn-sm">保存</button>
											<button type="reset" class="btn btn-outline-success btn-sm">重置</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</form>
				</div>
			</div>
		</div>
	</body>
</html>